package son.hut.vn.student.ad5;

import son.hut.vn.R;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MarkerStudent extends FragmentActivity{
	private GoogleMap googleMap;
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.marker_student);
		
		googleMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
		
		//mau mac dinh
		googleMap.addMarker(new MarkerOptions()
		        .position(new LatLng(20.98989, 105.787878))
		        .title("ATM").snippet("Techcombank")
		        .icon(BitmapDescriptorFactory.defaultMarker()));
		
		//mau tu chon
		googleMap.addMarker(new MarkerOptions()
		.position(new LatLng(20.898989, 105.787878))
		.title("Restaurant").snippet("Hai Xom")
		.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));
		
		//lay anh tu app
		googleMap.addMarker(new MarkerOptions()
		.position(new LatLng(20.88889, 105.187878))
		.title("Hospital").snippet("Bach Mai")
		.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher)));
		
	}

}
